import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

// 导入对应的tap-bar路由组件
import HomeContainer from '@/components/tabbar/HomeContainer.vue'
import MemberContainer from '@/components/tabbar/MemberContainer.vue'
import ShopCarContainer from '@/components/tabbar/ShopCarContainer.vue'
import SearchContainer from '@/components/tabbar/SearchContainer.vue'
// 导入对应的图标路由组件

import newslist from '@/components/news/newsList.vue'
import newsInfo from '@/components/news/newsInfo.vue'
// 创建路由对象并暴露出去
export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home',  //   设置首页为home 
    },
    {
      path: '/home',
      component: HomeContainer
    },
    {
      path: '/member',
      component: MemberContainer
    },
    {
      path: '/shopcar',
      component: ShopCarContainer
    },
    {
      path: '/search',
      component: SearchContainer
    },
    {
      path: '/home/newsList',
      component: newslist
    },
    {
      path: '/home/newsInfo/:id',
      component: newsInfo
    },
  ],
  linkActiveClass: 'mui-active'
})
